<template>
  <div style="background-color: white; min-height: 100vh;">
    <el-container style="height: 100vh;">
      <el-main style="display: flex; justify-content: center; align-items: center;">
        <el-form 
          :model="ruleForm" 
          ref="ruleForm" 
          label-width="100px"
          style="width: 600px;"
        > 
          <el-steps :active="2" align-center>
            <el-step title="步骤1" description="填写公司认证信息"></el-step>
            <el-step title="步骤2" description="签订入驻协议"></el-step>
            <el-step title="步骤3" description="公司入驻成功"></el-step>
          </el-steps>
          
          <div style="text-align: center; margin: 20px 0;">
            <h1>签订入驻协议</h1>
          </div>

          <el-form-item label="协议内容" prop="agreement">
            <el-input 
              type="textarea" 
              v-model="ruleForm.agreement" 
              :rows="8"
              style="width: 100%;"
            ></el-input>
          </el-form-item>

          <el-form-item style="text-align: center; margin-top: 30px;">
            <el-button type="primary" @click="submitForm" size="medium">
              注册
            </el-button>
            <el-button @click="goBack" size="medium">上一步</el-button>
          </el-form-item>
        </el-form>
      </el-main>
    </el-container>
  </div>
</template>

<script>
export default {
  data() {
    return {
      ruleForm: {
        agreement: '此处放的是合同内容' // 示例默认文本
      }
    }
  },
  methods: {
    submitForm() {
      // 表单提交逻辑
      console.log('提交表单:', this.ruleForm)
      // this.$router.push('/success') // 提交成功后跳转
    },
    goBack() {
      this.$router.go(-1) // 返回上一步
    }
  }
}
</script>

<style scoped>
.el-main {
  padding: 20px;
}
.el-steps {
  margin-bottom: 30px;
}
h1 {
  color: #333;
  font-size: 24px;
  margin: 0;
}
</style>